Skip to content

refactor: converge Windows + macOS into a monorepo#2

Merged
PCcoding666 merged 3 commits into
masterfrom
chore/monorepo
Jun 16, 2026
Merged

refactor: converge Windows + macOS into a monorepo#2
PCcoding666 merged 3 commits into
masterfrom
chore/monorepo

Conversation

@PCcoding666

Copy link
Copy Markdown
Owner

What

Converges the two platform apps — previously on permanently diverged branches (master = Windows, macos = macOS with Windows code deleted) — into a single trunk with platform subdirectories.

Layout

windows/      # .NET app (moved from repo root)
macos/        # Swift app (from the macos branch, incl. latest work)
benchmark/    # shared translation benchmarks
docs/         # shared / macOS user docs
LICENSE       # now covers the whole repo (was missing on macos branch)
README.md     # new cross-platform overview

CI

  • dotnet-build.yml / build-and-release.yml: build with working-directory: windows, artifact paths prefixed windows/
  • macos-build.yml: path-filtered to macos/**, branch targets updated to master
  • ⚠️ Windows CI path changes are unvalidated — .NET can't be built on macOS. Please confirm on a real push/PR run before relying on Windows releases.

Also

  • Removes translation_history.db (runtime SQLite artifact that was mistakenly tracked)
  • macOS app verified building (swift build) from its new location; 123 tests still pass

After merge

  • Set default branch to master, delete the stale macos and ci-cd-optimization branches
  • Note: Windows workflows trigger on main/develop but the default branch is master — a pre-existing mismatch worth aligning

🤖 Generated with Claude Code

The two platform apps lived on permanently diverged branches (master =
Windows, macos = macOS with Windows code deleted), making merges
impossible and letting shared docs/benchmark/LICENSE drift.

Converge into a single trunk with platform subdirectories:
- windows/  — the .NET app (moved from repo root)
- macos/    — the Swift app (brought in from the macos branch)
- benchmark/, docs/ shared at root; LICENSE now covers the whole repo
- new root README is a cross-platform overview

CI: each workflow path-filters its platform and builds from its subdir
(dotnet-build / build-and-release use working-directory: windows;
macos-build filters macos/**). Windows CI path changes need validation
on a real run — .NET can't be built on macOS here.

Drops translation_history.db, a runtime SQLite artifact mistakenly tracked.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 16, 2026 05:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR converges previously divergent Windows (.NET/WPF) and macOS (Swift) implementations into a single monorepo layout, and updates CI to build each platform from its new subdirectory paths.

Changes:

  • Introduces a windows/ WPF app subtree (plus build/versioning scripts, docs, and config) and a macos/ Swift package app subtree (plus tests and developer scripts).
  • Updates GitHub Actions workflows to use platform-scoped path filters and correct working directories/artifact paths.
  • Adds shared repo hygiene updates (e.g., .gitignore) and cross-platform documentation assets under docs/.

Reviewed changes

Copilot reviewed 61 out of 160 changed files in this pull request and generated no comments.

Show a summary per file
File Description
windows/version-info.json Adds Windows build/version metadata JSON.
windows/src/Views/Windows/WelcomeWindow.xaml.cs Adds Windows “Getting Started” window code-behind.
windows/src/Views/Windows/WelcomeWindow.xaml Adds Windows “Getting Started” window UI.
windows/src/Views/Windows/SplashWindow.xaml Adds splash screen UI for startup progress/logging.
windows/src/Views/Windows/SettingWindow.xaml.cs Adds settings window behaviors (theme/watchers/model selector).
windows/src/Views/Windows/MainWindow.xaml Adds main window shell/navigation UI.
windows/src/Views/Windows/EnterpriseWelcomeWindow.xaml.cs Adds enterprise setup window logic (startup toggle, registry).
windows/src/Views/Windows/EnterpriseWelcomeWindow.xaml Adds enterprise setup window UI.
windows/src/Views/Pages/InfoPage.xaml.cs Adds Info page code-behind (hyperlink nav).
windows/src/Views/Pages/InfoPage.xaml Adds Info page UI content and branding.
windows/src/Views/Pages/CaptionPage.xaml Adds caption display page UI (original/translated/context list).
windows/src/Views/Controls/VersionSettingsControl.xaml Adds UI for update/version settings.
windows/src/Services/Update/UpdateUtil.cs Adds helper to fetch latest release version from GitHub API.
windows/src/Services/Translation/TranslationTaskQueue.cs Adds translation task queue with completion/fault handling.
windows/src/Services/Startup/ApplicationSetup.cs Adds first-run setup/download/extract logic for Ollama runtime.
windows/src/Services/Platform/WindowsAPI.cs Adds Win32 interop helpers (window styles, positioning).
windows/src/Services/Platform/WindowHandler.cs Adds persistence helpers for saving/restoring window bounds.
windows/src/Services/Caption/TextUtil.cs Adds caption text utilities (newline normalization, similarity, URL normalize).
windows/src/Services/Caption/RegexPatterns.cs Adds compiled regex patterns used by caption processing and version parsing.
windows/src/Program.cs Adds console-style test harness entry point for Windows app.
windows/src/models/WindowState.cs Adds observable state models for main/overlay windows.
windows/src/models/VersionInfo.cs Adds semantic version model + parsing/comparison + build timestamp logic.
windows/src/models/TranslationHistoryEntry.cs Adds translation history entry model.
windows/src/models/TranslateAPIConfig.cs Adds translation config models (incl. Ollama config + recommended models).
windows/src/models/InitializationStep.cs Adds initialization-step model for splash/progress UI.
windows/src/models/Caption.cs Adds caption/context aggregation model for Windows app.
windows/src/AssemblyInfo.cs Adds explicit assembly/version metadata for Windows build stamping.
windows/src/App.xaml Adds WPF application resources/theme dictionaries/styles.
windows/scripts/diagnostics/diagnose-startup-issue-en.ps1 Adds diagnostic script for Ollama startup/download issues.
windows/scripts/diagnostics/clean-old-model.ps1 Adds script to remove old model and pull the new default model.
windows/scripts/deployment/startup.bat Adds startup helper to ensure Ollama is running before launching app.
windows/scripts/deployment/offline-setup.ps1 Adds offline resource provisioning script for Ollama/models.
windows/scripts/build/create-release.ps1 Adds PowerShell release version bump/tag workflow.
windows/scripts/build/build-version.ps1 Adds build-time version stamping for AssemblyInfo + version-info.json.
windows/README_zh-CN.md Adds Windows Chinese README content for local edition.
windows/package.json Adds Node dependency manifest under windows subtree.
windows/LiveCaptionsTranslator.sln Adds Visual Studio solution for Windows app.
windows/LiveCaptionsTranslator.csproj Adds Windows WPF project file with publish settings and package references.
windows/docs/user/USER_MANUAL.md Adds Windows user manual.
windows/docs/user/MAINTENANCE_GUIDE.md Adds Windows maintenance/build guide.
windows/docs/troubleshooting/FIX_DOWNLOAD_ISSUE.md Adds troubleshooting for Ollama download 404s and custom URL config.
windows/docs/troubleshooting/DELL_PATH_UPDATE.md Adds troubleshooting notes about Dell branding/path changes.
windows/docs/README.md Adds Windows docs index/structure overview.
windows/docs/dev/RELEASE_NOTES.md Adds Windows release notes for “Professional Edition” release.
windows/config/setting_new.json Adds default Windows settings template (Ollama model, prompt, window bounds).
macos/Tests/LCTMacTests/TranslationQueueTests.swift Adds macOS translation queue unit tests.
macos/Tests/LCTMacTests/TextUtilsTests.swift Adds macOS text utility unit tests.
macos/Tests/LCTMacTests/PauseResumeTests.swift Adds macOS pause/resume lifecycle tests.
macos/Tests/LCTMacTests/OllamaServiceTests.swift Adds macOS Ollama error/model Codable tests.
macos/Tests/LCTMacTests/OllamaServiceIntegrationTests.swift Adds mocked integration tests for Ollama service behaviors.
macos/Tests/LCTMacTests/CaptionSegmenterTests.swift Adds macOS caption segmentation/rollback tests.
macos/Tests/LCTMacTests/AppNoticeTests.swift Adds macOS structured notice/action tests.
macos/Scripts/setup.sh Adds macOS dev environment setup script.
macos/Scripts/run_tests.sh Adds macOS build/test runner script.
macos/Scripts/diagnose_permissions.sh Adds macOS permissions diagnostic script.
macos/Scripts/build-app.sh Adds macOS .app bundling + ad-hoc signing script.
macos/Scripts/build_signed.sh Adds macOS local signing helper script.
macos/README.md Adds macOS app README and architecture notes.
macos/QUICK_START.md Adds macOS end-user quick start guide.
macos/Package.swift Adds SwiftPM package definition for macOS app + SQLite dependency.
macos/Package.resolved Pins SwiftPM dependency versions.
macos/package-app.sh Adds CI-friendly .app packaging script (with version stamping).
macos/make-icon.swift Adds macOS icon generator script.
macos/LCTMac/Utils/CaptionSegmenter.swift Adds macOS caption segmentation logic (cutting/rollback).
macos/LCTMac/Models/TranslationSegment.swift Adds macOS translation segment model/state.
macos/LCTMac/Models/TranslationEntry.swift Adds macOS translation history entry + CSV export.
macos/LCTMac/Models/TranscriptionResult.swift Adds macOS transcription result/session models.
macos/LCTMac/Models/Speaker.swift Adds macOS speaker/diarization model + manager.
macos/LCTMac/Models/CaptionSegment.swift Adds macOS caption segment lifecycle model.
macos/LCTMac/Models/Caption.swift Adds macOS caption/context model (Windows-parity).
macos/LCTMac/Models/AppNotice.swift Adds macOS structured user notice/actions model.
macos/LCTMac/LCTMac.entitlements Adds macOS entitlements file.
macos/LCTMac/Info.plist Adds macOS Info.plist (bundle metadata + usage descriptions).
macos/LCTMac/App/LCTMacApp.swift Adds macOS SwiftUI app entry + commands + settings scene.
macos/LCTMac/App/AppDelegate.swift Adds macOS AppDelegate (logging, activation policy, status bar, permission preflight).
docs/VIDEO_SCRIPT.md Adds a macOS-focused intro video script.
docs/USER_GUIDE.md Adds macOS user guide.
.gitignore Updates ignore patterns (Windows installers; macOS build artifacts).
.github/workflows/macos-build.yml Adds macOS CI build + artifact + tag-triggered release job.
.github/workflows/dotnet-build.yml Updates Windows CI to use windows/ working directory and path filters.
.github/workflows/build-and-release.yml Updates Windows build/release workflow paths for new windows/ layout.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

PCcoding666 and others added 2 commits June 16, 2026 14:11
The setup view's async methods called the @mainactor OllamaModelManager
across an actor boundary. Swift 6.3 (local Xcode) inferred isolation and
let it pass, but the CI toolchain (swift 6.0) rejected it, failing the
macOS build. Mark the SwiftUI view @mainactor and modernize the speech
permission callback to Task { @mainactor in }.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The CI toolchain (swift 6.0) does not infer MainActor isolation for
SwiftUI App/View types the way local Xcode (swift 6.3) does, so every
view touching @mainactor state (view models, OllamaGuardian, NSSavePanel)
failed to compile. Annotate the views and app explicitly so the build is
correct on any Swift 6.x toolchain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@PCcoding666 PCcoding666 merged commit 45b2108 into master Jun 16, 2026
4 checks passed
@PCcoding666 PCcoding666 deleted the chore/monorepo branch June 16, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants